package cn.szabadsag.product.domain;

import cn.szabadsag.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends BaseDomain {

    private String name;
    private String resources;
    private BigDecimal saleprice;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date offsaletime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date onsaletime;

    //  0:表示    2：表示已出售
    private Integer state = 0;
    private BigDecimal costprice;
    private Date createtime = new Date();

    private Integer salecount;



    private ProductDetail detail = new ProductDetail();

}
